docs: add VHS demo screencast pipeline#109
Conversation
45b5eda to
b7a01d8
Compare
6d309d7 to
204c4e8
Compare
b7a01d8 to
804705b
Compare
Generate terminal demo GIFs for the README from VHS tapes, rendered in CI and published to an orphan `media` branch so no binaries land in the source history. The README embeds them by absolute raw URL. Tapes are pure command sequences; all setup (build dir on PATH, isolated config, the mock server) is done by docs/tapes/render.sh BEFORE vhs runs. This is deliberate: VHS types on a fixed clock and never waits for a command to return, so setup done inside a tape races the typing. Server-backed demos (chat, services) reuse the e2e harness's mock OpenAI server via a new standalone `rocm-demo-env` binary: it starts the mock, plants a managed-service record into an isolated config, and prints the env that points `rocm` at it — no GPU or real model needed. The record schema is shared with the cucumber World via `write_service_record` so the two can't drift. The mock ignores SIGINT/SIGHUP (VHS/ttyd emit some during terminal setup) and stops on SIGTERM, so it survives until the tape runs. Its chat reply is overridable via ROCM_MOCK_CHAT_REPLY. Rendering runs on workflow_dispatch and on release (never on PRs, where it would be slow and churn the branch); the release tag doubles as an image-cache buster. Stacked on #69 (the e2e harness this reuses); keep as draft until it lands. Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
760e977 to
5b889ae
Compare
Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
| require_file(&bin_dir.join(binary_name("rocm-demo-env")))?; | ||
|
|
||
| let demo_root = unique_demo_root(); | ||
| std::fs::create_dir_all(&demo_root) |
| } | ||
|
|
||
| fn require_file(path: &Path) -> Result<()> { | ||
| if !path.is_file() { |
Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
|
Blocking / must-fix before merge to main
peaceiris/actions-gh-pages publishes publish_dir (./rendered-media) with force_orphan; it does not consult docs/media/.gitignore. The staging copy is needed precisely because docs/media is git-ignored — the "Pages action honors that ignore file" clause is inaccurate and could mislead a future maintainer. Reword to just explain the staging copy.
Nits (optional)
|
|
|
||
| jobs: | ||
| render: | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
would it make sense to pin to a version in case version update causes breakage in the future.
clydehoang1
left a comment
There was a problem hiding this comment.
I can pre-approve assuming the security and quality checks are addressed.
Summary
Automates terminal demo GIFs for the README so they're generated in CI and never committed to source branches.
docs/tapes/) for four demos:version,engines list,services list, and one-shotchat.demo-gifsworkflow that builds the binaries, renders each tape, and publishes GIFs to an orphanmediabranch (force-pushed → single commit, old blobs GC'd). The README embeds them by absolute raw URL.chat,services) reuse this repo's e2e mock OpenAI server through a new standalonerocm-demo-envbinary: it boots the mock, plants a managed-service record into an isolated config, and prints the env that pointsrocmat it. No GPU or real model — renders are deterministic.write_service_record(used by both the cucumberWorldand the demo runner) so the two can't drift.ROCM_MOCK_CHAT_REPLYso screencasts read naturally instead of showing the test-only stub.Why
The README has no visual of the CLI in action. Purpose-built demos give reviewers and users an at-a-glance feel for
chat/serviceswithout anyone maintaining hand-recorded GIFs — and without bloatingmainwith binaries.Triggers
workflow_dispatch+ on published release (never on PRs — rendering is slow and would churn the branch). The release tag doubles as an image-cache buster for GitHub's proxy.Verification
rocm+rocm-demo-envbuild; e2e test target still compiles with the refactoredWorld.demo-env.sh→rocm services listshows the mock service;rocm chat --promptreturns the custom reply; the EXIT trap stops the server (no leak).Dependency / scope
mainand retarget.demo-gifsworkflow runs once, the README image links 404 (noted inline in the README).Risk
Low — no product code paths change. The only change to existing test code is extracting a shared helper (behavior-preserving) and an env-gated mock reply that defaults to the current string.